Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tests #15

Merged
merged 1 commit into from
Jun 23, 2018
Merged

Added tests #15

merged 1 commit into from
Jun 23, 2018

Conversation

anshuman23
Copy link
Owner

No description provided.

@anshuman23 anshuman23 merged commit ba0f920 into master Jun 23, 2018
end

test "Tensor Functionalities Test" do
dims = Tensorflex.create_matrix(1,3,[[1,1,3]])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to pattern match here. For example: {:ok, dims} = .... We rarely use elem in Elixir code.

use ExUnit.Case
doctest Tensorflex

test "Matrix Functionalities Test" do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is generally bad practice to have such large tests. Instead you want to do this:

describe "matrix functionalities" do
  test "creates matrixes" do
    ...
  end

  test "can get size of matrix" do
    ...
  end

  ...
end





Copy link
Contributor

@josevalim josevalim Jun 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a bunch of unnecessary extra new lines here. :)

@anshuman23
Copy link
Owner Author

Noted @josevalim! I will be sure to fix these issues in the next PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants